package lab02.test35;

public class Worker extends Employee {
    int day;
    double dailySalary;
    public Worker(String name,int day,double dailySalary) {
        super(name);
        this.dailySalary=dailySalary;
        this.day=day;
    }
    @Override
    public double computeSalary() {
        //则按他每月工作的天数计算工资
        return day*dailySalary;
    }
}
